package io.github.loan.head.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import io.github.loan.common.controller.BaseController;

@Controller
@RequestMapping("/head/users/")
public class UsersHeadController extends BaseController{
	/**
	 * 登陆后首页
	 * @return
	 */
	@RequestMapping("/index.mvc")
	public String index()
	{
		return "/head/users/index";
	}
	
	/**
	 * 退出
	 * @return
	 */
	@RequestMapping("/logout.mvc")
	public String logout(HttpServletRequest request)
	{
		HttpSession session=request.getSession();
		session.removeAttribute("users");
		return "redirect:/login.mvc" ; 
	}
}
